package demo01;

public class Main {
    public static void main(String[] args) {
        Originator o=new Originator();
        o.setState("ON");
        o.Show();


        Caretaker c=new Caretaker();
        c.setMemento(o.CreateMenento());

        o.setState("OFF");
        o.Show();

        o.SetMemento(c.getMemento());
        o.Show();

    }
}
